/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.accountsetting.view;

import android.content.Context;
import android.text.TextUtils.TruncateAt;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.qihoo.gamecenter.sdk.common.a.c;
import com.qihoo.gamecenter.sdk.common.d.a;
import com.qihoo.gamecenter.sdk.common.d.a.a;
import com.qihoo.gamecenter.sdk.common.i.s;
import com.qihoo.gamecenter.sdk.pay.res.b;

public class AccountNameView extends LinearLayout {
    private Context a;
    private b b;
    private TextView c;

    public AccountNameView(Context paramContext) {
        super(paramContext);
        this.a = paramContext;
        this.b = b.a(this.a);
        b();
        a();
    }

    private void b() {
        setOrientation(0);
        this.b.a(this, -1073741824);
        TextView localTextView = new TextView(this.a);
        localTextView.setLayoutParams(new ViewGroup.LayoutParams(-2, -1));
        localTextView.setGravity(16);
        localTextView.setText(a.a(a.a.gS));
        localTextView.setTextSize(1, s.a(this.a, 14.7F));
        localTextView.setTextColor(-11776948);
        addView(localTextView);
        this.c = new TextView(this.a);
        this.c.setLayoutParams(new ViewGroup.LayoutParams(-2, -1));
        this.c.setGravity(16);
        this.c.setEllipsize(TextUtils.TruncateAt.MIDDLE);
        this.c.setSingleLine(true);
        this.c.setTextSize(1, s.a(this.a, 14.7F));
        this.c.setTextColor(-628480);
        addView(this.c);
    }

    public void a() {
        if (this.c == null)
            return;
        this.c.setText(c.f());
    }
}